import React from 'react';
import {inject, observer} from 'mobx-react';

import {Spin} from 'antd';

import './style/';

@inject('portalDemoLoginStore')
@observer
class Login extends React.Component {
    constructor(props) {
        super(props);
    }

    componentWillMount() {
        const {portalDemoLoginStore} = this.props;
        portalDemoLoginStore.getLoginInfo();
    }

    render() {
        const {portalDemoLoginStore} = this.props;
        const {loading} = portalDemoLoginStore;

        if (loading) {
            return <Spin spinning={true} size="large" style={{position: 'absolute', top: '50%', width: '100%', height: '32px', marginTop: '-16px', textAlign: 'center'}}/>;
        }

        return (
            <div className="portal-cus-login-container">
                <span>示例登录页</span>
            </div>
        );
    }
}

export default Login;